from wxpyview.ui.component.common.basewidget import *

class ColorDialog(Widget):
    def _getParentParam(self, meta_widget):
        # TODO: re-implementation
        return None
    
    def _setParams(self, meta_widget):
        dom = meta_widget.getDOM()
        if not dom:
            raise IOException
        
        colourData = wx.ColourData()
        # windows only
        colourData.SetChooseFull(True)
        
        self.params["parent"] = self._getParentParam(meta_widget)
        self.params["data"] = colourData 
    
    def create(self, meta_widget):
        self._setParams(meta_widget)

        return wx.ColourDialog(**self.params)